package com.web.base.auth.message;

import java.io.Serializable;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import javax.validation.constraints.NotBlank;

import com.blue.core.dict.State;
import com.blue.validation.group.GetModel;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

/**
 * 角色请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2017年04月15日
 */
 public class RoleRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class, GetModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id;
	@NotNull(groups = { SaveModel.class }, message = "应用编号不能为空")
	private Integer appId;
	@NotBlank(groups = { SaveModel.class, UpdateModel.class }, message = "名称不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "名称长度[0-20]")
	private String name;
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "描述长度[0-200]")
	private String descp;
	private State state;
	
	public RoleRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getAppId()
	{
		return this.appId;
	}
	
	public void setAppId(Integer appId)
	{
		this.appId = appId;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getDescp()
	{
		return this.descp;
	}
	
	public void setDescp(String descp)
	{
		this.descp = descp;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
}
